package com.qiantu.api.entity;

import java.util.List;

public class SwitchBindBean {

    private String id;
    private String switchBindSerialNo;
    //设备动作 : 1 ,场景执行 : 2
    private int bindType;
    private String coreId;
    private String taskID;
    //设备或者场景的唯一码
    private String bindSerialNo;
    //动作类型：开关=1、模式=2
    private int actionType;
    //	绑定动作类型：打开=1、关闭=2、打开/关闭=2
    private int bindActionType;
    private List<SwitchBindActionBean> bindAction;
    private String bindActionName;
    //开关设备唯一码
    private String switchSerialNo;
    private List<SwitchActionBean> switchAction;
    private String switchName;
    //开关动作名称：单击、双击、长按..
    private String switchActionName;
    //绑定状态:初始化:1，绑定成功:2，绑定失败:3, 绑定超时:4
    private int bindSateType;
    private String houseSerialNo;
    private int state;
    private int switchKey;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSwitchBindSerialNo() {
        return switchBindSerialNo;
    }

    public void setSwitchBindSerialNo(String switchBindSerialNo) {
        this.switchBindSerialNo = switchBindSerialNo;
    }

    public int getBindType() {
        return bindType;
    }

    public void setBindType(int bindType) {
        this.bindType = bindType;
    }

    public String getCoreId() {
        return coreId;
    }

    public void setCoreId(String coreId) {
        this.coreId = coreId;
    }

    public String getTaskId() {
        return taskID;
    }

    public void setTaskID(String taskID) {
        this.taskID = taskID;
    }

    public String getBindSerialNo() {
        return bindSerialNo;
    }

    public void setBindSerialNo(String bindSerialNo) {
        this.bindSerialNo = bindSerialNo;
    }

    public int getActionType() {
        return actionType;
    }

    public void setActionType(int actionType) {
        this.actionType = actionType;
    }

    public int getBindActionType() {
        return bindActionType;
    }

    public void setBindActionType(int bindActionType) {
        this.bindActionType = bindActionType;
    }

    public List<SwitchBindActionBean> getBindAction() {
        return bindAction;
    }

    public void setBindAction(List<SwitchBindActionBean> bindAction) {
        this.bindAction = bindAction;
    }

    public String getBindActionName() {
        return bindActionName;
    }

    public void setBindActionName(String bindActionName) {
        this.bindActionName = bindActionName;
    }

    public String getSwitchSerialNo() {
        return switchSerialNo;
    }

    public void setSwitchSerialNo(String switchSerialNo) {
        this.switchSerialNo = switchSerialNo;
    }

    public  List<SwitchActionBean> getSwitchAction() {
        return switchAction;
    }

    public void setSwitchAction(List<SwitchActionBean> switchAction) {
        this.switchAction = switchAction;
    }

    public String getSwitchName() {
        return switchName;
    }

    public void setSwitchName(String switchName) {
        this.switchName = switchName;
    }

    public String getSwitchActionName() {
        return switchActionName;
    }

    public void setSwitchActionName(String switchActionName) {
        this.switchActionName = switchActionName;
    }

    public int getBindSateType() {
        return bindSateType;
    }

    public void setBindSateType(int bindSateType) {
        this.bindSateType = bindSateType;
    }

    public String getHouseSerialNo() {
        return houseSerialNo;
    }

    public void setHouseSerialNo(String houseSerialNo) {
        this.houseSerialNo = houseSerialNo;
    }

    public static class SwitchActionBean {
        String deviceSerialNo;
        DeviceState deviceState;
        public String getState(){
            return deviceSerialNo +"-"+ deviceState.key_index +"-"+ deviceState.key_operate;
        }
    }

    public static class DeviceState {
        Integer key_index;
        Integer key_operate;
    }



    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getSwitchKey() {
        return switchKey;
    }

    public void setSwitchKey(int switchKey) {
        this.switchKey = switchKey;
    }
}
